package org.onion.pattern.sample.active.listener;

import lombok.extern.slf4j.Slf4j;
import org.onion.pattern.event.springboot.rocketmq.annotation.RocketMQConsumerGroup;
import org.onion.pattern.event.springboot.rocketmq.annotation.RocketMQEventListener;
import org.onion.pattern.event.springboot.rocketmq.annotation.enums.ListenerMode;
import org.onion.pattern.sample.active.service.event.ActCrateEventExt;
import org.onion.pattern.sample.active.service.event.ActCrateEventII;
import org.springframework.stereotype.Component;

/**
 * 父子继承
 */
@Component
@RocketMQConsumerGroup(value = "ActiveListenerII", listenerMode = ListenerMode.Concurrently)
@Slf4j
public class InheritListener {


    @RocketMQEventListener(ActCrateEventII.class)
    public void on(ActCrateEventII event) {

        log.info("【收到消息】 InheritListener 父类监听 {}",event);
    }


    @RocketMQEventListener
    public void on(ActCrateEventExt event) {

        log.info("【收到消息】 InheritListener 子类监听 {}",event);
    }



}
